package com.autumn.config.cfg;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.connection.RedisConnectionFactory;

import com.autumn.redis.AutumnRedisTemplate;

/**
 * Bean 配置
 * 
 * @author 老码农
 *
 *         2018-01-03 16:28:19
 */
@Configuration
public class BeanConfig {
	@Bean
	@Primary
	public AutumnRedisTemplate redisTemplate(RedisConnectionFactory factory) {
		AutumnRedisTemplate template = new AutumnRedisTemplate(factory);
		return template;
	}
}
